package Design_patterns.creator_mode.factory.abstractFactory;

import Design_patterns.creator_mode.factory.abstractFactory.coffee_package.Coffee;
import Design_patterns.creator_mode.factory.abstractFactory.dessert_package.Dessert;
import Design_patterns.creator_mode.factory.abstractFactory.factory.ItalyDessertFactory;

/**
 * @description: 测试咖啡店类
 **/

public class Client {
    public static void main(String[] args) {
        //创建意大利风味甜品工厂
        ItalyDessertFactory italyDessertFactory = new ItalyDessertFactory();
        //获取拿铁咖啡和提拉米苏
        Coffee coffee = italyDessertFactory.createCoffee();
        Dessert dessert = italyDessertFactory.createDessert();
        System.out.println("coffee.getName() = " + coffee.getName());
        dessert.show();
    }
}
